package com.jet.cashier.gate;

import com.jet.cashier.service.CashierIgnoreService;
import com.jet.core.result.ResultJson;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 抹零规则
 */
@RestController
@RequestMapping("/gate/cashier/ignore")
public class GateCashierIgnoreController {

    @Resource
    private CashierIgnoreService cashierIgnoreService;

    @GetMapping("/set-list")
    public ResultJson getSetList(@RequestHeader long merchantNo,
                                 @RequestHeader long storeNo,
                                 @RequestHeader String accountId) {
        return ResultJson.ok(cashierIgnoreService.getSetList());
    }

    @GetMapping
    public ResultJson info(@RequestHeader long merchantNo,
                           @RequestHeader long storeNo,
                           @RequestHeader String accountId) {
        return ResultJson.ok(cashierIgnoreService.info(merchantNo));
    }
}
